<template>
  <div>
    <button @click="loginClick">登陆</button>
  </div>
</template>

<script>
import { useRouter } from "vue-router";

export default {
  setup() {
    const loginClick = () => {
      window.localStorage.setItem("token", "why");
      
      useRouter.push({
        path: "/home",
      });
    };

    return { loginClick };
  },
};
</script>

<style scoped></style>
